/**
 * TManView.java
 * ************************** 
 * @date Jun 1, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package gossipServices.bootstraping.tman;

import java.util.List;
import java.util.Vector;

import gossipServices.basic.nodeDescriptors.NodeDescriptor;
import gossipServices.basic.view.ConcretePartialView;

/**
 * Description: 
 *
 */
public class TManView extends ConcretePartialView {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * @param size
	 */
	public TManView(int size) {
		super(size);
	}

	/**
	 * @param descriptorsList
	 */
	public TManView(List<NodeDescriptor> descriptorsList) {
		super(descriptorsList);
	}

	/**
	 * @param adding
	 */
	public TManView(Vector<NodeDescriptor> adding) {
		super(adding);
	}
	
	public String toString(){
		String ret = new String();
		ret += "neighboorhood Level) | nodeID | node name | node address\n";
		for(int i=0; i<size(); i++){
			NodeDescriptor node = getAt(i);
			ret += i/2+") | "+node.getNodeID()+" | "
			+node.getNodeName()+" | "+node.getNodeAddress()+"\n";
		}
		return ret;
	}

}
